package msg

import "time"

type Message struct {
	ID        uint64 `gorm:"primary_key"`
	ClientID  string
	TopicType int8
	TopicID   string
	SourceID  uint64
	TargetID  uint64
	MsgType   int8
	Info      string
	SendSelf  bool
	CreatedAt time.Time `gorm:"type:timestamp;"`
	UpdatedAt time.Time `gorm:"type:timestamp;"`
}

type MessageTopic struct {
	ID               uint64
	UserPlatformID   uint64
	UserID           uint64
	TargetPlatformID uint64
	TargetID         uint64
	TopicType        int8
	TopicID          string
	MaxMsgID         uint64
	ReadMsgID        uint64
	IsReplied        bool
	CreatedAt        time.Time `gorm:"type:timestamp;"`
	UpdatedAt        time.Time `gorm:"type:timestamp;"`
}
